package com.fruit.service.goods.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fruit.mapper.goods.BaseMapper;
import com.fruit.pojo.goods.Base;
import com.fruit.service.goods.BaseManager;

@Service
public class BaseService implements BaseManager {

	@Autowired
	private BaseMapper baseMapper;

	@Override
	public List<Base> getBaseInfo() {
		return baseMapper.getBaseInfo();
	}

	@Override
	public int updateBase(Base base) {
		int wid=baseMapper.getWeatherCon(base.getWeatherType());
		if(wid>0){
			base.setWeatherConfigId(Integer.toString(wid));
		}
		return baseMapper.updateBase(base);
	}
	
	
}
